unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Btnx_1: TButton;
    procedure Btnx_1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Btnx_1Click(Sender: TObject);
var
  IdexA:Integer;
  ListA:TStringList;
begin
  try
    ListA:=TStringList.Create;
    ListA.Add('banana');
    ListA.Add('Apple');
    ListA.Add('Pear');
    ListA.Add('Orange');

    ListA.Sorted:=True;

    IdexA:=-1;
    ListA.Find('banana',IdexA);
    ShowMessageFmt('%D',[IdexA]);
  finally
    FreeAndNil(ListA);
  end;
end;

end.
